<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/2
  Time: 17:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%--
            文件上传三要素
                1.表单提交方式必须为post
                2.表单的enctype 属性必须为：multipart/from-data
                3.表单中不许有文件上传项
        --%>
    <form method="post" enctype="multipart/form-data" action="${pageContext.request.contextPath}/upload">
        <input type="file" name="upload">
        <br>
        <input type="text" name="name">
        <input type="text" name="password">

        <input type="submit" value="文件上传">
        <img src="/upload/10aa4e5b81964795b20c496023546a0c_1.jpg">
    </form>
</body>
</html>
